// backManageDlg.h : header file
//

#pragma once
#include "TabSheet.h"
#include "MenuTableDlg.h"
#include "EmployeeTableDlg.h"
#include "CustomerTableDlg.h"
#include "PermissionTableDlg.h"
#include "CostTableDlg.h"
#include "StatisticsTableDlg.h"
#include "SettingTableDlg.h"
#include "stdafx.h"

class CTCPClientSocket;
class CUDPSocket;
class CMenuTableDlg;
class CEmployeeTableDlg;
class CCustomerTableDlg;
class CPermissionTableDlg;
class CCostTableDlg;
class CStatisticsTableDlg;
class CSettingTableDlg;

// CbackManageDlg dialog
class CbackManageDlg : public CMaxDisplayDlg
{
// Construction
public:
	CbackManageDlg(CWnd* pParent = NULL);	// standard constructor

	//CTabSheet 			m_TabSheet;
	CMenuTableDlg 		m_MenuTableDlg;
	CEmployeeTableDlg	m_EmployeeTableDlg;
	CCustomerTableDlg	m_CustomerTableDlg;
	CPermissionTableDlg	m_PermissionTableDlg;
	CCostTableDlg		m_CostTableDlg;
	CStatisticsTableDlg		m_StatisticsTableDlg;
	CSettingTableDlg		m_SettingTableDlg;

// Dialog Data
	enum { IDD = IDD_BACKMANAGE_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
private:
	void TxGetXMLVersion(void);
	void RxGetXMLVersion(XMLVersion *pVer);
	void TxGetMenuXML(void);
	void RxGetMenuXML(CMDRes *pRet);

	
// Implementation
protected:
	HICON m_hIcon;
	MSXML::IXMLDOMDocumentPtr m_plDomDocument;
	MSXML::IXMLDOMElementPtr m_pDocRoot;

	CTCPClientSocket* 	m_pTCPClientSocket;
	CUDPSocket* 			m_pUDPSocket;
	CString 				m_strClientName;

	CString 				m_UdpText;
	u32					m_nTCPPort;
	CString				m_nServerIP;
	u32					m_nUDPPort;
	CIPAddressCtrl 		m_nIP;
	u32					m_nMenuVer;
	u32					m_nConfVer;
	u32					m_nMenuSerVer;
	BOOL				m_bTables[6];

	HANDLE        			m_hEvent;
	u32					m_nTxCMD;
	u32					m_nRxErr;





	
	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg LRESULT OnNetMessage(WPARAM wParam, LPARAM lParam);	
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnClose();
public:
	afx_msg void OnBnClickedBtnMenu();	
public:
	afx_msg void OnBnClickedBtnEmployee();
public:
	afx_msg void OnBnClickedBtnCustomer();
public:
	afx_msg void OnBnClickedBtnPermission();
public:
	afx_msg void OnBnClickedBtnCost();
public:
	afx_msg void OnBnClickedBtnStatistics();
public:
	afx_msg void OnBnClickedBtnSetting();
};
